package com.proscenic.ops.mp.controller;

import com.proscenic.ops.mp.dto.PostParam;
import com.proscenic.ops.mp.dto.VerifyParam;
import com.proscenic.ops.mp.service.PortalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @version 1.0
 * created by chenxin on 2021/11/2 19:20
 */
@Api(tags = {"入口管理"})
@RestController
@RequestMapping("/api/mp/portal")
public class PortalController {
    @Resource
    private PortalService portalService;

    @ApiOperation("校验")
    @GetMapping(produces = "text/plain;charset=utf-8")
    public String verify(VerifyParam param){
        return portalService.verify(param);
    }

    @ApiOperation("post")
    @PostMapping(produces = "text/plain;charset=utf-8")
    public String post(PostParam param, @RequestBody String body){
        return portalService.post(param, body);
    }
}
